#include<bits/stdc++.h>
using namespace std;
double x[10000],y[10000];
int main()
{
	int n,i,j;
	double distance,mn=0x3f3f3f3f*1.0;
	cin>>n;
	for(i=1;i<=n;i++)
		cin>>x[i]>>y[i];
    for(i=1;i<=n;i++)
    {
    	for(j=i+1;j<=n;j++)
    	{
    		distance=(x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i]);
			if(distance<mn)
				mn=distance;
		}
	}
	printf("%.4f",sqrt(mn));
	return 0;
}
